3.152 \(\int x \sqrt{a+a \cos (x)} \, dx\)

Optimal. Leaf size=32 \[ 4 \sqrt{a \cos (x)+a}+2 x \tan \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a} \]

[Out]

4*Sqrt[a + a*Cos[x]] + 2*x*Sqrt[a + a*Cos[x]]*Tan[x/2]

________________________________________________________________________________________

Rubi [A]  time = 0.0500326, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3319, 3296, 2638} \[ 4 \sqrt{a \cos (x)+a}+2 x \tan \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a} \]

Antiderivative was successfully verified.

[In]

Int[x*Sqrt[a + a*Cos[x]],x]

[Out]

4*Sqrt[a + a*Cos[x]] + 2*x*Sqrt[a + a*Cos[x]]*Tan[x/2]

Rule 3319

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[((2*a)^IntPart[n
]*(a + b*Sin[e + f*x])^FracPart[n])/Sin[e/2 + (a*Pi)/(4*b) + (f*x)/2]^(2*FracPart[n]), Int[(c + d*x)^m*Sin[e/2
 + (a*Pi)/(4*b) + (f*x)/2]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[n
 + 1/2] && (GtQ[n, 0] || IGtQ[m, 0])

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int x \sqrt{a+a \cos (x)} \, dx &=\left (\sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \int x \cos \left (\frac{x}{2}\right ) \, dx\\ &=2 x \sqrt{a+a \cos (x)} \tan \left (\frac{x}{2}\right )-\left (2 \sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \int \sin \left (\frac{x}{2}\right ) \, dx\\ &=4 \sqrt{a+a \cos (x)}+2 x \sqrt{a+a \cos (x)} \tan \left (\frac{x}{2}\right )\\ \end{align*}

Mathematica [A]  time = 0.021216, size = 22, normalized size = 0.69 \[ 2 \left (x \tan \left (\frac{x}{2}\right )+2\right ) \sqrt{a (\cos (x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[x*Sqrt[a + a*Cos[x]],x]

[Out]

2*Sqrt[a*(1 + Cos[x])]*(2 + x*Tan[x/2])

________________________________________________________________________________________

Maple [C]  time = 0.154, size = 55, normalized size = 1.7 \begin{align*}{\frac{-i\sqrt{2} \left ( 2\,i{{\rm e}^{ix}}+x{{\rm e}^{ix}}+2\,i-x \right ) }{{{\rm e}^{ix}}+1}\sqrt{a \left ({{\rm e}^{ix}}+1 \right ) ^{2}{{\rm e}^{-ix}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+a*cos(x))^(1/2),x)

[Out]

-I*2^(1/2)*(a*(exp(I*x)+1)^2*exp(-I*x))^(1/2)/(exp(I*x)+1)*(2*I*exp(I*x)+x*exp(I*x)+2*I-x)

________________________________________________________________________________________

Maxima [A]  time = 2.30039, size = 32, normalized size = 1. \begin{align*} 2 \,{\left (\sqrt{2} x \sin \left (\frac{1}{2} \, x\right ) + 2 \, \sqrt{2} \cos \left (\frac{1}{2} \, x\right )\right )} \sqrt{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*cos(x))^(1/2),x, algorithm="maxima")

[Out]

2*(sqrt(2)*x*sin(1/2*x) + 2*sqrt(2)*cos(1/2*x))*sqrt(a)

________________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*cos(x))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: UnboundLocalError

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x \sqrt{a \left (\cos{\left (x \right )} + 1\right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*cos(x))**(1/2),x)

[Out]

Integral(x*sqrt(a*(cos(x) + 1)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \cos \left (x\right ) + a} x\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+a*cos(x))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(a*cos(x) + a)*x, x)